#ifndef FLOWMETER_H
#define FLOWMETER_H

#include <QObject>
#include <QString>
#include <QByteArray>
#include <QMetaEnum>


class Flowmeter : public QObject
{
    Q_OBJECT

public:

    enum protocolList{
        Error=0,
        A,
        B,
        C,
        D,
    };
    Q_ENUM(protocolList)

    static QString getReadCmd(QString protocol,int commAddr);
    static QString getDataResultStr(QString protocol,int commAddr,QString recvData);


signals:



public slots:



private:

    static int getCrc(QString Str,int startIndex,int length);
};

#endif // FLOWMETER_H
